import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('./views/About.vue')
    },


    //饿了么项目
    {
      path: '/index',
      name: 'index',
      component: () => import('./views/index.vue'),
      children:[
        {
          path: '/article',
          name: 'article',
          component: () => import('./components/home/article.vue'),
        },
        {
          path: '/evaluate',
          name: 'evaluate',
          component: () => import('./components/home/evaluate.vue'),
        },
        {
          path: '/merchant',
          name: 'merchant',
          component: () => import('./components/home/merchant.vue'),
        },
      ]

    },
  ]
})
